package lib

import (
	"math/rand"
	"time"
)

// 测试数据生成

func GeneratorOrderedSlice(bound int) []int {
	var nums []int
	for i := 0; i < bound; i++ {
		nums = append(nums, i)
	}
	return nums
}

func GeneratorRandomSlice(n, bound int) []int {
	var nums []int
	rand.Seed(time.Now().Unix()) // 初始化随机数
	for i := 0; i < n; i++ {
		nums = append(nums, rand.Intn(bound))
	}
	return nums
}
